<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>Assertions (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Assertions (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.util</a></div>
<h2 title="Class Assertions" class="title">Class Assertions</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.util.Assertions</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">Assertions</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Provides methods for asserting the truth of expressions and properties.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkArgument(boolean)">checkArgument</a></span>&#8203;(boolean&nbsp;expression)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>expression</code> evaluates to false.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkArgument(boolean,java.lang.Object)">checkArgument</a></span>&#8203;(boolean&nbsp;expression,
             <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>expression</code> evaluates to false.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkIndex(int,int,int)">checkIndex</a></span>&#8203;(int&nbsp;index,
          int&nbsp;start,
          int&nbsp;limit)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IndexOutOfBoundsException</code></a> if <code>index</code> falls outside the specified bounds.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkMainThread()">checkMainThread</a></span>()</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if the calling thread is not the application's main
 thread.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkNotEmpty(java.lang.String)">checkNotEmpty</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;string)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>string</code> is null or zero length.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkNotEmpty(java.lang.String,java.lang.Object)">checkNotEmpty</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;string,
             <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>string</code> is null or zero length.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkNotNull(T)">checkNotNull</a></span>&#8203;(T&nbsp;reference)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>NullPointerException</code></a> if <code>reference</code> is null.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkNotNull(T,java.lang.Object)">checkNotNull</a></span>&#8203;(T&nbsp;reference,
            <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>NullPointerException</code></a> if <code>reference</code> is null.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkState(boolean)">checkState</a></span>&#8203;(boolean&nbsp;expression)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>expression</code> evaluates to false.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkState(boolean,java.lang.Object)">checkState</a></span>&#8203;(boolean&nbsp;expression,
          <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>expression</code> evaluates to false.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkStateNotNull(T)">checkStateNotNull</a></span>&#8203;(T&nbsp;reference)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>reference</code> is null.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkStateNotNull(T,java.lang.Object)">checkStateNotNull</a></span>&#8203;(T&nbsp;reference,
                 <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>reference</code> is null.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="checkArgument(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkArgument</h4>
<pre class="methodSignature">@Pure
public static&nbsp;void&nbsp;checkArgument&#8203;(boolean&nbsp;expression)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>expression</code> evaluates to false.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expression</code> - The expression to evaluate.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If <code>expression</code> is false.</dd>
</dl>
</li>
</ul>
<a id="checkArgument(boolean,java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkArgument</h4>
<pre class="methodSignature">@Pure
public static&nbsp;void&nbsp;checkArgument&#8203;(boolean&nbsp;expression,
                                 <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>expression</code> evaluates to false.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expression</code> - The expression to evaluate.</dd>
<dd><code>errorMessage</code> - The exception message if an exception is thrown. The message is converted
     to a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink"><code>String</code></a> using <a href="https://developer.android.com/reference/java/lang/String.html?is-external=true#valueOf(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.valueOf(Object)</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If <code>expression</code> is false.</dd>
</dl>
</li>
</ul>
<a id="checkIndex(int,int,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkIndex</h4>
<pre class="methodSignature">@Pure
public static&nbsp;int&nbsp;checkIndex&#8203;(int&nbsp;index,
                             int&nbsp;start,
                             int&nbsp;limit)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IndexOutOfBoundsException</code></a> if <code>index</code> falls outside the specified bounds.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index to test.</dd>
<dd><code>start</code> - The start of the allowed range (inclusive).</dd>
<dd><code>limit</code> - The end of the allowed range (exclusive).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The <code>index</code> that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="externalLink" target="_top">IndexOutOfBoundsException</a></code> - If <code>index</code> falls outside the specified bounds.</dd>
</dl>
</li>
</ul>
<a id="checkState(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkState</h4>
<pre class="methodSignature">@Pure
public static&nbsp;void&nbsp;checkState&#8203;(boolean&nbsp;expression)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>expression</code> evaluates to false.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expression</code> - The expression to evaluate.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If <code>expression</code> is false.</dd>
</dl>
</li>
</ul>
<a id="checkState(boolean,java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkState</h4>
<pre class="methodSignature">@Pure
public static&nbsp;void&nbsp;checkState&#8203;(boolean&nbsp;expression,
                              <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>expression</code> evaluates to false.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>expression</code> - The expression to evaluate.</dd>
<dd><code>errorMessage</code> - The exception message if an exception is thrown. The message is converted
     to a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink"><code>String</code></a> using <a href="https://developer.android.com/reference/java/lang/String.html?is-external=true#valueOf(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.valueOf(Object)</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If <code>expression</code> is false.</dd>
</dl>
</li>
</ul>
<a id="checkStateNotNull(java.lang.Object)">
<!--   -->
</a><a id="checkStateNotNull(T)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkStateNotNull</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;checkStateNotNull&#8203;(@Nullable
                                      T&nbsp;reference)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>reference</code> is null.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the reference.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reference</code> - The reference.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null reference that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If <code>reference</code> is null.</dd>
</dl>
</li>
</ul>
<a id="checkStateNotNull(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a id="checkStateNotNull(T,java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkStateNotNull</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;checkStateNotNull&#8203;(@Nullable
                                      T&nbsp;reference,
                                      <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if <code>reference</code> is null.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the reference.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reference</code> - The reference.</dd>
<dd><code>errorMessage</code> - The exception message to use if the check fails. The message is converted
     to a string using <a href="https://developer.android.com/reference/java/lang/String.html#valueOf(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.valueOf(Object)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null reference that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If <code>reference</code> is null.</dd>
</dl>
</li>
</ul>
<a id="checkNotNull(java.lang.Object)">
<!--   -->
</a><a id="checkNotNull(T)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkNotNull</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;checkNotNull&#8203;(@Nullable
                                 T&nbsp;reference)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>NullPointerException</code></a> if <code>reference</code> is null.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the reference.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reference</code> - The reference.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null reference that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top">NullPointerException</a></code> - If <code>reference</code> is null.</dd>
</dl>
</li>
</ul>
<a id="checkNotNull(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a id="checkNotNull(T,java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkNotNull</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;checkNotNull&#8203;(@Nullable
                                 T&nbsp;reference,
                                 <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>NullPointerException</code></a> if <code>reference</code> is null.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type of the reference.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reference</code> - The reference.</dd>
<dd><code>errorMessage</code> - The exception message to use if the check fails. The message is converted
     to a string using <a href="https://developer.android.com/reference/java/lang/String.html#valueOf(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.valueOf(Object)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null reference that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/NullPointerException.html" title="class or interface in java.lang" class="externalLink" target="_top">NullPointerException</a></code> - If <code>reference</code> is null.</dd>
</dl>
</li>
</ul>
<a id="checkNotEmpty(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkNotEmpty</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;checkNotEmpty&#8203;(@Nullable
                                   <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;string)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>string</code> is null or zero length.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - The string to check.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null, non-empty string that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If <code>string</code> is null or 0-length.</dd>
</dl>
</li>
</ul>
<a id="checkNotEmpty(java.lang.String,java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkNotEmpty</h4>
<pre class="methodSignature">@EnsuresNonNull("#1")
@Pure
public static&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;checkNotEmpty&#8203;(@Nullable
                                   <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;string,
                                   <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;errorMessage)</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalArgumentException</code></a> if <code>string</code> is null or zero length.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>string</code> - The string to check.</dd>
<dd><code>errorMessage</code> - The exception message to use if the check fails. The message is converted
     to a string using <a href="https://developer.android.com/reference/java/lang/String.html#valueOf(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.valueOf(Object)</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The non-null, non-empty string that was validated.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If <code>string</code> is null or 0-length.</dd>
</dl>
</li>
</ul>
<a id="checkMainThread()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>checkMainThread</h4>
<pre class="methodSignature">@Pure
public static&nbsp;void&nbsp;checkMainThread()</pre>
<div class="block">Throws <a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>IllegalStateException</code></a> if the calling thread is not the application's main
 thread.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalStateException</a></code> - If the calling thread is not the application's main thread.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
